#include <string>
#pragma once

// create a DVD object to store DVD information
struct Dvd {
	int dvdId; // unique identification for a DVD
	bool isRented; // status of DVD
	std::string rentedBy; //username

	Dvd* next;
};

class Movie {
private:
	// Movie variables to store information about a movie
	std::string title;
	std::string starring;
	std::string director;
	std::string duration;
	std::string genre;
	std::string classification;
	std::string release_date;
	int movieId; // id for a particular movie "the matrix"
	int size; // size of dvd list
	int rentedCount; // number of times a DVD has been rented
	Movie* left; // left child pointer
	Movie* right; // right child pointer

public:
	// Constructors
	Movie(void);
	~Movie(void);

	// Variables
	Dvd* head;

	// Methods

	int dvdCount(); // nubmer of DVDs of a movie

	// pre: true
	// post: adds a DVD to the system
	void addDvd(Dvd* newItem);

	// pre: true
	// post: retrieved a specific DVD
	Dvd *retrieveDvd(int position);

	// pre: true
	// post: deletd a DVD from the system
	bool deleteDvd(int position);

	// Point methods
	// pre: true
	// post: sets the point to the left
	void setLeft(Movie* newLeft);

	// pre: true
	// post: gets the left leaf of the tree
	Movie* getLeft();

	// pre: true
	// post: sets the point to the right
	void setRight(Movie* newRight);

	// pre: true
	// post: gets the right leaf of the tree
	Movie* getRight();

	// encapsulation for variables
	// pre: true
	// post: sets the movie's title
	void setTitle(std::string newTitle);

	// pre: true
	// post: returns the movie's title
	std::string getTitle();

	// pre: true
	// post: sets the star of a movie
	void setStarring(std::string newStarring);

	// pre: true
	// post: returns the star of the movie
	std::string getStarring();

	// pre: true
	// post: sets the movie's director
	void setDirector(std::string newDirector);

	// pre: true
	// post: returns the movie's director
	std::string getDirector();

	// pre: true
	// post: sets the movie's duration
	void setDuration(std::string newDuration);

	// pre: true
	// post: returns the movie's duration
	std::string getDuration();

	// pre: true
	// post: sets the movie's genre
	void setGenre(std::string newGenre);

	// pre: true
	// post: returns the movie's genre
	std::string getGenre();

	// pre: true
	// post: sets the movie's classification
	void setClassification(std::string newClassification);

	// pre: true
	// post: returns the movie's classification
	std::string getClassification();

	// pre: true
	// post: sets the movie's release date
	void setReleaseDate(std::string newReleaseDate);

	// pre: true
	// post: returns the movie's release date
	std::string getReleaseDate();

	// pre: true
	// post: sets the movie's identification number
	void setMovieId(int newMovieId);

	// pre: true
	// post: return the movie's identification number
	int getMovieId();

	// pre: true
	// post: returns the movie's binary identification
	std::string getMovieBinaryId();

	// pre: true
	// post: increments the rental count
	void incrementRentalCount();

	// pre: true
	// post: returns rental count
	int getRentalCount();
};